package com.zhihua.interview.merge.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.zhihua.interview.merge.dao.IOrderDao;
import com.zhihua.interview.merge.dao.IStockDao;
import com.zhihua.interview.merge.entity.OrderEntity;
import com.zhihua.interview.merge.service.ISaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ISaveServiceImpl implements ISaveService {

    @Autowired
    public IOrderDao iOrderDao;

    @Autowired
    public IStockDao iStockDao;


    @Override
    public int saveorder(String json) {
        JSONObject jsonObject1 = JSONObject.parseObject(json);

        OrderEntity order = new OrderEntity();
        int i = iOrderDao.saveOrder(order);
        return i;
    }


}
